﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using Microsoft.Win32;

public class RegistryTools
{
    public static void OptimizeWebPublishing()
    {
        //HKEY_CURRENT_USER\Software\Auburn Electronics Group\ProScore\Custom
        RegistryKey registry = null;
        registry = Registry.CurrentUser.OpenSubKey(@"Software\Auburn Electronics Group\ProScore\Custom",true);
        //registry.SetValue("MSOHostName", "msox.meetscoresonline.com");
        registry.SetValue("MSOHostName", "beta.mso.bz");
        //Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion", false);
        //string[] officekeys = Office.GetSubKeyNames();
        //RegistryKey Registration = null;
        //foreach (string officekey in officekeys)
        //{
        //    RegistryKey testkey = Office.OpenSubKey(officekey,false);
        //    foreach (string evalkey in testkey.GetSubKeyNames())
        //    {
        //        if (evalkey == "Registration")
        //            Registration = Office.OpenSubKey(officekey,false).OpenSubKey(evalkey,false);
        //    }
        //}
        //string[] idkeys = Registration.GetSubKeyNames();
        //registry = Registration.OpenSubKey(idkeys[0],false);
    }
}

